Ext.define('js.system.UnitAAddPage', {
    extend: 'Ext.form.Panel',
    requires: ['js.Util', 'js.ctrl.Common'],
    controller: 'Common',
    config: {
        bodyPadding: '0 20 0 20',
        layout: {
            type: 'vbox',
            align: 'stretch'
        }
    },
    hidenField: {
        region_id: undefined
    },
    fieldDefaults: {
        labelWidth:100,
        flex:1,
        xtype: 'panel',
        allowBlank: false
    },
    initComponent: function () {
        let dwmc = Ext.create('Ext.form.field.Text', {
            name: 'unit_name',
            width: '100%',
            id:'unit_nameA',
            height: 36,
            margin: '20 20 10 20',
            allowBlank: false,
            fieldLabel: '单位名称',
        });
        let sfqy = {
            xtype: 'combobox',
            height: 36,
            width: '100%',
            name: 'enable',
            id:'enableA',
            margin: '10 20 10 20',
            fieldLabel: '是否启用',
            allowBlank: false,
            value: 1,
            triggerAction: 'all',
            editable: false,
            displayField: 'dataType',
            valueField: 'value',
            store: [
                {value: 1, dataType: '是'},
                {value: 2, dataType: '否'},
            ],
        };

        this.items = [dwmc, sfqy];
        this.callParent(arguments);
    }
});